package com.jiazhong.cloud.config.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RefreshScope
@RestController
@RequestMapping("/nacos_config")
public class NacosConfigController {
    @Value("${student.name}")
    private String name;
    @Value("${student.id}")
    private Integer id;
    @Value("${student.gender}")
    private Character gender;
    @Value("${user.name}")
    private String bb_name;

    @GetMapping
    public String get() {
        return "This is NacosConfigController,name:" + name + ",id:" + id + ",gender:" + gender + ",bb_name:" + bb_name;
    }
}
